package com.fwtai.api;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * 通知|公告
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2021年7月20日 10:42:45
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class ApiMallDao{

  private final DaoHandle dao;

  public ApiMallDao(final DaoHandle dao){
    this.dao = dao;
  }

  public List<HashMap<String,Object>> listMallGoods(final PageFormData formData){
    return dao.queryForListHashMap("api_mall.listMallGoods",formData);
  }

  public List<HashMap<String,Object>> getGoodsSpec(final List<Long> kids){
    return dao.queryForListHashMap("api_mall.getGoodsSpec",kids);
  }

  public HashMap<String,Object> getGoodsInfo(final long kid){
    return dao.queryForHashMap("api_mall.getGoodsInfo",kid);
  }

  public List<HashMap<String,Object>> queryList(final long kid){
    return dao.queryForListHashMap("api_mall.queryList",kid);
  }

  public List<HashMap<String,Object>> getGoodsCategory(){
    return dao.queryForListHashMap("api_mall.getGoodsCategory");
  }
}